import {Sprite} from "../base/Sprite.js";
import {DataStore} from "../base/DataStore.js";
// import {Director} from "../Director.js";


export class Pencil extends Sprite{
    constructor(image,top) {
        super(image, 0, 0, image.width, image.height
            , DataStore.getInstance().canvas.width, 0, image.width, image.height);
        this.top = top;
        this.speed = 2;
    }

    draw(img = this.img, srcX = this.srcX, srcY = this.srcY, srcW = this.srcW, srcH = this.srcH, x = this.x, y = this.y, width = this.width, height = this.height) {
        this.x -= this.speed;
        super.draw(img, srcX, srcY, srcW, srcH, this.x, y, width, height);
    }
}